Skip to content

Comments

DP-44544 Fix-bug-in-advanced-search-for-documents-view#3252

Open
dstorozhuk wants to merge 16 commits intodevelopfrom
feature/DP-44544-Fix-bug-in-advanced-search-for-documents-view
Open

DP-44544 Fix-bug-in-advanced-search-for-documents-view#3252
dstorozhuk wants to merge 16 commits intodevelopfrom
feature/DP-44544-Fix-bug-in-advanced-search-for-documents-view

Conversation

@dstorozhuk
Copy link
Collaborator

Description:
Explain the technical implementation of the work done.

Jira: (Skip unless you are MA staff)
DP-****

To Test:

  • Add steps to test this feature

Peer Review Checklist

…nd revise pagination settings

Integrated `better_exposed_filters` module into the `all_documents_latest_rev` view. Switched exposed form type to `bef`, revised pager to use full pagination with first/last links, and configured additional filter options to enhance search usability.

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
…for parent organizations without children

Resolved issue with `INNER JOIN` on `node__field_organizations` that excluded parent organizations without child organizations by changing the join type to `LEFT`. Added a reflection-based adjustment to modify the query behavior dynamically.

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
…vanced-search-for-documents-view

* refs/heads/develop:
  DP-44147: Address issues flagged by nightly_pending_security workflow (#3249)
  DP-44415-A11Y-Broken-aria-link-context-for-directions-link-on-org-page (#3240)
  DP-44729: help text microsite image size (#3248)
Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 3, 2026 02:04 Destroyed
…ove code clarity

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 3, 2026 02:10 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 3, 2026 04:29 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 10, 2026 04:30 Destroyed
…ch-for-documents-view

* develop:
  DP-44710-Heading-level-skipped-accessibility-error-on-promo-pages-with-video (#3247)
  changelog update and remove old changelog files
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 10, 2026 17:31 Destroyed
- Fix duplicate rows caused by LEFT JOIN to multi-value organizations field
  - Added delta=0 condition to join only first organization per media
  - Eliminated ~29,576 duplicate rows (468,929 → 439,353 total)

- Add Views Bulk Operations (VBO) functionality
  - Added bulk selection checkboxes to table
  - Enabled actions: Publish, Unpublish, Bulk Edit, Delete
  - Configured for 10 items per batch with form step

- Changed distinct: true to false in view config
  - DISTINCT didn't work with multi-value fields
  - Fixed via join condition instead

Technical changes:
- Modified hook_views_query_alter() in mass_views.module
- Updated views.view.all_documents_latest_rev.yml
- Added module dependencies: views_bulk_operations, views_data_export

Tested with 100 results - zero duplicates confirmed.
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 12, 2026 14:42 Destroyed
- Remove trailing whitespace on lines 284 and 414
- Fixes Squiz.WhiteSpace.SuperfluousWhitespace.EndLine violations
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 12, 2026 16:16 Destroyed
…ch-for-documents-view

* develop:
  DP-44947: Disable jQuery modules on prod (#3256)
  DP-41803: A11Y datatable uses duplicate table tag (#3243)
  changelog update and remove old changelog files
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 12, 2026 17:09 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 02:21 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 02:41 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 03:30 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 03:51 Destroyed
Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@dstorozhuk dstorozhuk force-pushed the feature/DP-44544-Fix-bug-in-advanced-search-for-documents-view branch from a6c6647 to a6d9946 Compare February 13, 2026 04:04
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 04:04 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 04:26 Destroyed
@dstorozhuk dstorozhuk force-pushed the feature/DP-44544-Fix-bug-in-advanced-search-for-documents-view branch from 49fd695 to a6d9946 Compare February 13, 2026 05:07
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 05:07 Destroyed
…anced search

- Removed redundant code for handling duplicate rows caused by multi-value fields.
- Introduced a container-aware approach in `OrgFilterMedia` to manage joins more effectively.
- Updated `all_documents_latest_rev` view configuration to use the new `media_org_filter`.
- Ensured join adjustments are processed via dependency injection for improved maintainability.
- Adjusted cache metadata to avoid stale results.

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 05:47 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 15:22 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 13, 2026 16:08 Destroyed
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 17, 2026 04:32 Destroyed
…ch-for-documents-view

* develop:
  revert 42778 and update the fields description (#3263)
  DP-44755: Clamav Debug mode (#3259)
  DP-44722: For collection pages, include the org search in the top search bar (#3260)
  changelog update and remove old changelog files
  DP-44176  Change-the-MySQL-version-in-CircleCI-in-ddev-to-match-the-db-version-in-on-Acquia (#3227)
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 19, 2026 20:46 Destroyed
…encies and fix organization filters

- Removed `better_exposed_filters` module dependency from `all_documents_latest_rev` view.
- Replaced `OrgTopParentFilter` implementation with a more robust `media_org_filter`.
- Fixed joins for organization filters to improve query accuracy and performance.
- Added revisions and ID fields to enhance filtering and display functionality.

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 19, 2026 22:57 Destroyed
…clarity

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
@arthurbaghdas arthurbaghdas temporarily deployed to Tugboat February 20, 2026 00:13 Destroyed
…mprove filter usability

- Added `delta = 0` condition to LEFT JOIN for `field_organizations` in query alter to eliminate duplicate rows.
- Updated exposed form type to `input_required` and added guidance text for filters.
- Improved query and filter behavior for advanced search functionality.

Signed-off-by: Dmytro Storozhuk <dima@itech4web.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants